package com.lengxf.design;

public class Client {

    public static void main(String[] args) {
        Approver a1, a2, a3;
        a1 = new Director("张三");
        a2 = new VicePresident("李四");
        a3 = new President("王五");
        a1.setSuccessor(a2);
        a2.setSuccessor(a3);
        PurchaseRequest r1 = new PurchaseRequest(45000, 10001, "购买倚天剑");
        a1.processRequest(r1);
        PurchaseRequest r2 = new PurchaseRequest(60000, 10002, "购买葵花宝典");
        a2.processRequest(r2);
        PurchaseRequest r3 = new PurchaseRequest(160000, 10003, "购买金刚经");
        a3.processRequest(r3);
    }

}
